import request from '@/utils/request'

// 查询配置列表
export function listConfig(query) {
  return request({
    url: '/activity/rank/config/list',
    method: 'get',
    params: query
  })
}

export function getActivity(id) {
  return request({
    url: '/activity/rank/one/' + id,
    method: 'get',
  })
}

export function updateActivity(data){
  return request({
    url: '/activity/rank/update',
    method: 'put',
    params: data
  })
}

export function addActivity(data) {
  return request({
    url: '/activity/rank/add',
    method: 'post',
    params: data
  })
}

export function deleteActivity(id) {
  return request({
    url: '/activity/rank/delete/' + id,
    method: 'delete',
  })
}

// 删除配置
export function delParameter(id) {
  return request({
    url: '/activity/red/limit/parameter/' + id,
    method: 'delete'
  })
}

export function getLabels() {
  return request({
    url: '/activity/rank/labels',
    method: 'get'
  })
}

